/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author ChArFaTo
 */
@Entity
@Table(name = "horario", catalog = "proyectosw", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "HorarioEJB.findAll", query = "SELECT h FROM HorarioEJB h"),
    @NamedQuery(name = "HorarioEJB.findByHoId", query = "SELECT h FROM HorarioEJB h WHERE h.hoId = :hoId"),
    @NamedQuery(name = "HorarioEJB.findByHoHorarInicio", query = "SELECT h FROM HorarioEJB h WHERE h.hoHorarInicio = :hoHorarInicio"),
    @NamedQuery(name = "HorarioEJB.findByHoHoraFin", query = "SELECT h FROM HorarioEJB h WHERE h.hoHoraFin = :hoHoraFin"),
    @NamedQuery(name = "HorarioEJB.findByHoDia", query = "SELECT h FROM HorarioEJB h WHERE h.hoDia = :hoDia")})
public class HorarioEJB implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer hoId;
    @Size(max = 255)
    @Column(length = 255)
    private String hoHorarInicio;
    @Size(max = 255)
    @Column(length = 255)
    private String hoHoraFin;
    @Size(max = 255)
    @Column(length = 255)
    private String hoDia;
    @JoinColumn(name = "SalonSCodigo", referencedColumnName = "SCodigo")
    @ManyToOne
    private SalonEJB salonSCodigo;
    @JoinColumn(name = "GrupoGCodigo", referencedColumnName = "GCodigo")
    @ManyToOne
    private GrupoEJB grupoGCodigo;

    public HorarioEJB() {
    }

    public HorarioEJB(Integer hoId) {
        this.hoId = hoId;
    }

    public Integer getHoId() {
        return hoId;
    }

    public void setHoId(Integer hoId) {
        this.hoId = hoId;
    }

    public String getHoHorarInicio() {
        return hoHorarInicio;
    }

    public void setHoHorarInicio(String hoHorarInicio) {
        this.hoHorarInicio = hoHorarInicio;
    }

    public String getHoHoraFin() {
        return hoHoraFin;
    }

    public void setHoHoraFin(String hoHoraFin) {
        this.hoHoraFin = hoHoraFin;
    }

    public String getHoDia() {
        return hoDia;
    }

    public void setHoDia(String hoDia) {
        this.hoDia = hoDia;
    }

    public SalonEJB getSalonSCodigo() {
        return salonSCodigo;
    }

    public void setSalonSCodigo(SalonEJB salonSCodigo) {
        this.salonSCodigo = salonSCodigo;
    }

    public GrupoEJB getGrupoGCodigo() {
        return grupoGCodigo;
    }

    public void setGrupoGCodigo(GrupoEJB grupoGCodigo) {
        this.grupoGCodigo = grupoGCodigo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (hoId != null ? hoId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof HorarioEJB)) {
            return false;
        }
        HorarioEJB other = (HorarioEJB) object;
        if ((this.hoId == null && other.hoId != null) || (this.hoId != null && !this.hoId.equals(other.hoId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Modelo.HorarioEJB[ hoId=" + hoId + " ]";
    }
    
}
